E-Consultations / Chats
E-Consultations and chats (referred to as chats from now on) are represented by collections of Communication resources, grouped under one Encounter resource.
Sending a message
To send a message, a POST request should be made to the <TENANT_BASE_URL>/fhir/R4/Patient/<PATIENT_ID>/Communication/$new-econsult endpoint.
The request body should be a Parameters resource containing the following parameters:
message
The actual message to be sent.conversation-identifier
The identifier of the conversation to which the message belongs.sent[optional - default now]
The date and time the message was sent.
This will create a new Communication resource.
In cases where the conversation-identifier is an existing conversation, the message will be added to the existing conversation.
If the conversation-identifier is not an existing conversation, a new conversation will be created (in the form of a new Encounter resource with the given conversation-identifier as the identifier).
Retrieving a conversation
All conversations for a given patient can simply be retrieved through a search on Communication resources. The available search parameters are:
encounter:Encounter.code
Must be set tohttps://referentiemodel.nhg.org/tabellen/nhg-tabel-14-contactwijze|12to search for chats.encounter
The ID of the Encounter (conversation) to search for, if known.encounter:identifier
The identifier of the Encounter (conversation) to search for (<SYSTEM>|<VALUE>).
GET <TENANT_BASE_URL>/fhir/R4/Patient/<PATIENT_ID>/Communication?encounter:Encounter.code=https://referentiemodel.nhg.org/tabellen/nhg-tabel-14-contactwijze|12&encounter:identifier=http://medikit.nl/patient-portal|1234567890